#include<encode_manager.h>

PEncodeOpr g_ptEncodeOprHead = NULL;


void RegisterEncodeOpr(PEncodeOpr ptEncodeOpr)
{
	ptEncodeOpr->ptNext = g_ptEncodeOprHead;
	g_ptEncodeOprHead = ptEncodeOpr;
}

void EncodeSystemRegister(void)
{
	extern void UTF8EncodeOprRegister(void);
	UTF8EncodeOprRegister();	
}

int IsEncodeSupport(unsigned char* mem)
{
	PEncodeOpr ptEncodeOprTemp = g_ptEncodeOprHead;
	
	while(ptEncodeOprTemp)
	{
		if(ptEncodeOprTemp->IsEncode(mem))
		{
			return 1;
		}

		ptEncodeOprTemp = ptEncodeOprTemp->ptNext;
	}

	return 0;
}


